home *** CD-ROM | disk | FTP | other *** search
/ Lattice ISP Synario Start… & ISP Encyclopedia 1997 / LATTICE Synario.iso / setup / master.inf < prev    next >
Encoding:
INI File  |  1997-08-08  |  54.6 KB  |  1,855 lines

  1. DefineVariables
  2.   Text         [ProductFamily]
  3. ;;Space requirements for each sub-category of files
  4.   Text      [ExeSpace]
  5.   Text      [LibSpace]
  6.   Text      [CfgSpace]
  7.   Text      [ExaSpace]
  8. ;;Root directory for each sub-category of files
  9.   Text      [DefaultDirectory]
  10.   Text      [FromDirectory]
  11.   Text      [ExeDirectory]
  12.   Text      [LibDirectory]
  13.   Text      [CfgDirectory]          
  14.   Text      [ExaDirectory]
  15.   Text      [OptDirectory]
  16.   Text      [IniDirectory]
  17.   Text      [SetupDirectory]
  18.   Text      [ProductDirectory]
  19.   Text      [LicenseDirectory]
  20. ;; Text Strings for passing info between Pre and Post install procedures
  21.   Text      [SemiDirectory]
  22.   Text      [SemiIniFile]
  23.   Text      [SemiString]
  24.   Logical   [SemiControl]
  25. ;;Version information for comparison by install
  26.   Text      [OriginalVersion]
  27.   Text      [NewVersion]
  28.   Logical   [Continue]
  29.   Logical   [ModifyFiles]
  30. ;;Context that is required for this product to install
  31.   Text      [ContextName]
  32.   Text      [ContextDescription]
  33. ;;String to display in title bars
  34.   Text        [ProductName]
  35.   Text      [ProductDescription]
  36.   Text      [ModelNumber]
  37. ;;Context information  
  38.   Text      [StringPrefix]
  39.   Text      [StringVersion]
  40.   Text      [StringName]
  41. ;;Filename of Product License Template (to be merged into DIOREG.DAT)
  42.   Text      [ProductLicenseTemplate]
  43. ;; Product information  used when parsing the product.ini file
  44.   Text      [ProductKey]
  45.   Text      [ProductValue]
  46.   Text      [ProductBegin]
  47.   Text      [ProductPreInstall]
  48.   Text      [ProductInstall]
  49.   Text      [ProductPostInstall]
  50.   Text      [ProductEnd]
  51.   Text        [ProgramGroupName]
  52. ;; Component information used when parsing the product.ini file
  53.   Text      [ComponentKey]
  54.   Text      [ComponentValue]
  55.   Text      [ComponentName]
  56.   Text      [ComponentLibrary]
  57.   Text      [ComponentFunction]
  58.   Text      [InstallProcedure]
  59.   Text      [BuildVersionProc]
  60.   Text        [BuildNumber]
  61.   Number    [DiskNumber]
  62. ;; Variables used when parsing the ini files
  63.   Text      [GeneralKey]
  64.   Text      [GeneralValue]
  65. ;;
  66.   Text      [NewDll]
  67. EndDefineVariables
  68.  
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. ;; Main 
  71. ;;
  72.  
  73.  
  74. SetBackgroundColor 0 0 255 0 0 255
  75. SetBackgroundModeTo Transparent
  76. ShowWindow Maximized
  77. SetBackupModeTo BAK
  78. SetTopLineTo "Synario Design Automation Installation"
  79.  
  80. SetMouseCursor Wait
  81.  
  82. [ProgramGroupName] := "ABEL 6.5" ;; Default to ABEL
  83. If [CommandLine2]  = abel        ;; Display ABEL product bitmap
  84.     LoadBitMap 1 abelins.bmp
  85. Else
  86.     If [CommandLine2] = ablsngl     ;; Bitmap for Single Vendor ABEL
  87.         LoadBitMap 1 abelins.bmp
  88.     Else                         ;; Display Synario product bitmap
  89.         LoadBitMap 1 synins.bmp  ;; for SECS and Single Vendor
  90.         [ProgramGroupName] := "Synario 3.1"      ;; Set Prog Group Name
  91.     EndIf
  92. EndIf
  93. ShowBitMap 1 @xy(0,0)
  94.  
  95. ;; The configuration files are placed in the TEMP directory
  96. [IniDirectory] := EnvironmentStringFor TEMP
  97. If [IniDirectory] = BlankString
  98.     Dialog UseHeader "Error"
  99.         Error                                     
  100.         Environment variable TEMP is not set.
  101.         Could not find the Customer Configuration file.
  102.     EndDialog
  103.  
  104.     Do ErrorFreeScript
  105.     Goto [Point1] 
  106. EndIf
  107.  
  108. Do SetProductDirectory
  109.  
  110. [ProductFamily]  := [CommandLine2]  ;; will be abel or synario
  111. [SetupDirectory] := [InstallFromDirectory]  
  112.  
  113. If FileExists [IniDirectory]\[ProductFamily].ini
  114.  
  115.     [ProductKey]  := PROD1       ;; Always start at first product
  116.     [Number2] := 1               ;; Keep count with Prod numbers
  117.     [Number3] := 1               ;; Keep track of Tens of products
  118.  
  119.     ;; Look for product section in the customer configuration file
  120.     [GeneralKey] := "NAME"
  121.     Do GetProductKeyValue
  122.     [ProductValue] := [GeneralValue]
  123.     [ProductName]  := [GeneralValue]
  124.     
  125.     ;; Check to see if product was found in configuration file
  126.     If [ProductValue] = BlankString
  127.         Dialog UseHeader "Error"
  128.             Error
  129.             Could not find any Products to install in
  130.             the Customer Configuration file.
  131.         EndDialog
  132.  
  133.         Do ErrorFreeScript
  134.         Goto [Point1] 
  135.     EndIf
  136.  
  137.     ;; Call routine to uncompress installs compressed library
  138.     Do InitializeInstall
  139.     SetMouseCursor Arrow
  140.  
  141.     ;; Initialize global variables for the overall product context
  142.     Do GetContextSectionInfo
  143.  
  144.     ;; Began looping to install all products listed in config file
  145.     [YesOrNo1] := YesCharacter
  146.     while [YesOrNo1] = YesCharacter
  147.  
  148.         ;; Now should have Products Name, get rest of info in section       
  149.         Do GetProductSectionInfo
  150.  
  151.         [ProductValue] := [FromDirectory]
  152.  
  153.         ;; Set the Directory path  from which files will be pulled from
  154.         [InstallFromDirectory] := [ProductDirectory]\[FromDirectory]
  155.  
  156.         ;; InstallFromDrive is suppose to be set automatically, but does not work
  157.         [InstallFromDrive] := SubStringOf [InstallFromDirectory] from Beginning to 1
  158.  
  159.         ;; Now Call procedure to BEGIN installing particular product
  160.         Do [ProductBegin]
  161.  
  162.         If [ProductPreInstall]  <> BlankString
  163.             ;; Call procedure for any pre-install things to do
  164.             Do [ProductPreInstall]
  165.         Endif
  166.  
  167.         ;; BOOL used to determine if the MergeLicense proc has been called yet
  168.         [YesOrNo4] := NoCharacter
  169.         [DiskNumber] := 1
  170.         
  171.         ;; Call procedure to read all Product Components and install the
  172.         ;; Compressed libraries for each. This procedure calls the main
  173.         ;; [ProductInstall] procedure as defined in the configuration file.
  174.         Do InstallComponents
  175.  
  176.         If [ProductPostInstall] <> BlankString
  177.             ;; Call procedure for any post-install things to do
  178.             Do [ProductPostInstall]
  179.         EndIf
  180.  
  181.         ClearScreen
  182.         
  183.         ;; Call procedure to END installing particular product
  184.         Do [ProductEnd]
  185.  
  186.         ;; Look for another product in configuration file
  187.         IncrementNumber [Number2]      ;; Bump up number
  188.         If [Number2] == 10             ;; Ten is a magic number
  189.             If [Number3] == 1
  190.                 [ProductKey] := PROD10
  191.             Else
  192.                 If [Number3] == 2       ;; More than 20 selected 
  193.                     [ProductKey] := PROD20
  194.                 Else                   ;; More than 30 selected
  195.                     [ProductKey] := PROD30
  196.                 EndIf
  197.             EndIf                       ;; 39 products selected is limit
  198.    
  199.               [Number2] := 0
  200.                IncrementNumber [Number3]
  201.         Else
  202.             IncrementString [ProductKey]   ;; This should build PRODx
  203.         EndIf
  204.  
  205.         ;; Look for next product section in the customer config file
  206.         [GeneralKey] := "NAME"
  207.         Do GetProductKeyValue
  208.         [ProductValue] := [GeneralValue]
  209.         [ProductName]  := [GeneralValue]
  210.  
  211.         ;; Check to see if product was found in configuration file
  212.         [YesOrNo1] := YesCharacter
  213.         If [ProductValue] = BlankString
  214.             [YesOrNo1] := NoCharacter
  215.         Else
  216.             ;; Following commands solve problems with program manager on Win 95
  217.             If WindowsVersion >= 3.9
  218.                 Dialog 1000 UseHeader "Install"
  219.                     Installing...
  220.                 EndDialog
  221.             EndIf                
  222.         EndIf
  223.  
  224.     EndWhile
  225.  
  226.     [InstallFromDirectory] := [SetupDirectory]  
  227.     ;; If Win32s v1.30 can not be found, display a message (Win 3.1 only)
  228.     Do CheckForWin32s130
  229.  
  230. Else            
  231.     Dialog UseHeader "Error"
  232.         Error
  233.         Could not find Customer Configuration file.
  234.     EndDialog
  235.  
  236.     Do ErrorFreeScript
  237.     Goto [point1]
  238. Endif
  239.  
  240. Do FinishedMessage
  241.  
  242. Do FreeScript    ;; Will try to run the registration editor
  243.  
  244. [Point1]        ;; Goto point incase of configuration file problems
  245.  
  246. SoLong
  247.  
  248. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  249. ;; Procedure will peel off the directory path from the command line
  250. ;; variable that holds the master.inf file path. The ProductDirectory
  251. ;; can be a CD drive, Floppy or Network drive letter
  252. ;;
  253. Procedure SetProductDirectory
  254.  
  255.     [Number1] := PositionOf "master.inf" in [CommandLine1]
  256.     If [Number1] > 2
  257.         [Number1] := [Number1] - 1
  258.         [ProductDirectory] := SubStringOf [CommandLine1] from Beginning to [Number1]
  259.     Else
  260.         Dialog UseHeader "Error"
  261.             Error                                 
  262.             Could not determine the directory that contains
  263.             the product files.
  264.         EndDialog
  265.  
  266.         Do ErrorFreeScript
  267.         Goto [Point1]         ;; 
  268.     EndIf
  269.  
  270. EndProcedure
  271.  
  272. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  273. ;; Procedure will execute the statements needed to copy the required
  274. ;; installation files (generaly dll's) in to  the proper location
  275. ;;
  276. Procedure InitializeInstall
  277.  
  278.     ;; Set the Directory path  from which files will be pulled from
  279.     [InstallFromDirectory] := [SetupDirectory]\Install
  280.  
  281.     InstallSeries Install promptfor "Please insert disk number 1 in drive [InstallFromDrive]:"
  282.  
  283.     Do QueToShadowDirectory   ;; Setup Install files
  284.     Do CheckForExtraDlls      ;; Checks for install dlls in memory
  285.  
  286.     Do SetupCTL3D             ;; Copy DLLs around
  287.     Do InitScript             ;; setup background
  288.  
  289. EndProcedure
  290.  
  291. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  292. ;; Procedure will read all the context information from the customer
  293. ;;           configuration file and assign it to global variables
  294. ;;
  295. Procedure GetContextSectionInfo
  296.  
  297.     [GeneralKey] := "CONTEXTNAME"
  298.     Do GetContextKeyValue
  299.     [ContextName] := [GeneralValue]
  300.  
  301.     [GeneralKey] := "CONTEXTDESC"
  302.     Do GetContextKeyValue
  303.     [ContextDescription] := [GeneralValue]
  304.     
  305.     [GeneralKey] := "DEFAULTDIR"
  306.     Do GetContextKeyValue
  307.     [DefaultDirectory] := [GeneralValue]
  308.  
  309.     [GeneralKey] := "PREFIX"
  310.     Do GetContextKeyValue
  311.     [StringPrefix] := [GeneralValue]
  312.  
  313.     [GeneralKey] := "VERSION"
  314.     Do GetContextKeyValue
  315.     [StringVersion] := [GeneralValue]
  316.  
  317. EndProcedure     
  318.  
  319. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  320. ;; Procedure to read a string from the Context section of the customer
  321. ;;           configuration file
  322. ;;
  323. Procedure GetContextKeyValue
  324.  
  325.     ;; Look for context section in the customer configuration file
  326.     [Array1][1]   := CONTEXT.[ProductFamily]
  327.     [Array1][2]   := [GeneralKey]  ;; Keyword
  328.     [Array1][3]   := BlankString                ;; Default value
  329.     [Array1][4]   := [IniDirectory]\[ProductFamily].ini ;; Config file name
  330.  
  331.     GetPrivateProfileString Using [Array1]      ;; Read file 
  332.  
  333.     [GeneralValue] := [Array1][5]               ;; Value is placed here
  334.  
  335. EndProcedure
  336.  
  337. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  338. ;; Procedure will read all the product information from the customer
  339. ;;           configuration file and assign it to global variables
  340. ;;
  341. Procedure GetProductSectionInfo
  342.  
  343.     [GeneralKey] := "FROMDIR"
  344.     Do GetProductKeyValue
  345.     [FromDirectory] := [GeneralValue]
  346.  
  347.     [GeneralKey] := "MODEL"
  348.     Do GetProductKeyValue
  349.     [ModelNumber] := [GeneralValue]
  350.  
  351.     [GeneralKey] := "LICENSE"
  352.     Do GetProductKeyValue
  353.     [ProductLicenseTemplate] := [GeneralValue]
  354.     
  355.     [GeneralKey] := "DESCRIPTION"
  356.     Do GetProductKeyValue
  357.     [ProductDescription] := [GeneralValue]
  358.     
  359.     [GeneralKey] := "BEGIN"
  360.     Do GetProductKeyValue
  361.     [ProductBegin] := [GeneralValue]
  362.  
  363.     [GeneralKey] := "PRE"
  364.     Do GetProductKeyValue
  365.     [ProductPreInstall] := [GeneralValue]
  366.  
  367.     [GeneralKey] := "INSTALL"
  368.     Do GetProductKeyValue
  369.     [ProductInstall] := [GeneralValue]
  370.  
  371.     [GeneralKey] := "POST"
  372.     Do GetProductKeyValue
  373.     [ProductPostInstall] := [GeneralValue]
  374.  
  375.     [GeneralKey] := "END"
  376.     Do GetProductKeyValue
  377.     [ProductEnd] := [GeneralValue]
  378.  
  379. EndProcedure     
  380.  
  381. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  382. ;; Procedure to read a string from the Product section of the customer
  383. ;;           configuration file
  384. ;;
  385. Procedure GetProductKeyValue
  386.  
  387.     ;; Look for product section in the customer configuration file
  388.     [Array1][1]   := PRODUCT.[ProductFamily]
  389.     [Array1][2]   := [ProductKey].[GeneralKey]  ;; Keyword
  390.     [Array1][3]   := BlankString                ;; Default value
  391.     [Array1][4]   := [IniDirectory]\[ProductFamily].ini ;; Config file name
  392.  
  393.     GetPrivateProfileString Using [Array1]      ;; Read file 
  394.  
  395.     [GeneralValue] := [Array1][5]               ;; Value is placed here
  396.  
  397. EndProcedure
  398.  
  399. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  400. ;; Procedure to read a string from the Component section of the customer
  401. ;;           configuration file
  402. ;;
  403. Procedure GetComponentKeyValue
  404.  
  405.     ;; Look for product section in the customer configuration file
  406.     [Array2][1]   := COMPONENT.[ProductFamily].[ProductKey]
  407.     [Array2][2]   := [ComponentKey].[GeneralKey]  ;; Keyword
  408.     [Array2][3]   := BlankString                  ;; Default value
  409.     [Array2][4]   := [IniDirectory]\[ProductFamily].ini ;; Config file name
  410.  
  411.     GetPrivateProfileString Using [Array2]        ;; Read file 
  412.  
  413.     [GeneralValue] := [Array2][5]                 ;; Value is placed here
  414.  
  415. EndProcedure
  416.  
  417. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  418. ;; Will read the component section. The procedure Requires that the
  419. ;; string [ProductInstall] be set first. The ProductInstall procedure is
  420. ;; the product specific piece that knows about product groupings.  
  421. ;;
  422. Procedure InstallComponents
  423.  
  424.     [ComponentKey]  := COMP1       ;; Always start at first Component
  425.  
  426.     ;; Look for Component section in the customer configuration file
  427.     [GeneralKey] := "NAME"
  428.     Do GetComponentKeyValue
  429.     [ComponentName] := [GeneralValue]
  430.  
  431.     ;; Look for libraries in the Component section of the config file
  432.     [GeneralKey] := "LIBRARY"
  433.     Do GetComponentKeyValue
  434.     [ComponentValue] := [GeneralValue]
  435.  
  436.     ;; Check to see if component was found in configuration file
  437.     If [ComponentValue] = BlankString
  438.         Dialog UseHeader "Error"
  439.             Error
  440.             Could not find any Component Libraries
  441.             in the Customer Configuration file.
  442.         EndDialog
  443.  
  444.         Goto [Point2] 
  445.     EndIf
  446.  
  447.     ;; Began looping to install all components for ABEL product
  448.     [YesOrNo2] := YesCharacter
  449.     while [YesOrNo2] = YesCharacter
  450.  
  451.         ;; Begin loop to pull  off all compressed library names from component
  452.         ;; section
  453.         [DiskNumber] := 1
  454.  
  455.         [InstallProcedure] := [ProductInstall]
  456.         ;; call procedure to loop through all library names on LIBRARY line
  457.         Do ProcessLibraries
  458.  
  459.         IncrementNumber [DiskNumber]
  460.  
  461.         ;; Look for a special Options Library for current component
  462.         [GeneralKey]  := "OPTLIB"
  463.         Do GetComponentKeyValue          ;; look for component.OPTLIB
  464.         [ComponentValue] := [GeneralValue]
  465.  
  466.         ;; Check to see if Component was found in configuration file
  467.         If [ComponentValue] <> BlankString
  468.         
  469.             [InstallProcedure] := "OptionInstallFiles"  ;; currently hard coded
  470.             ;; call procedure to loop through all library names on OPTLIB line
  471.             Do ProcessLibraries
  472.  
  473.             IncrementNumber [DiskNumber]
  474.             
  475.         EndIf
  476.         
  477.         ;; Look for another Component in configuration file
  478.         IncrementString [ComponentKey]   ;; This should build COMPx
  479.  
  480.         ;; Look for Componen.Name in the customer configuration file
  481.         [GeneralKey] := "NAME"
  482.         Do GetComponentKeyValue
  483.         [ComponentName] := [GeneralValue]
  484.  
  485.         [GeneralKey] := "LIBRARY"
  486.         Do GetComponentKeyValue
  487.         [ComponentValue] := [GeneralValue]
  488.  
  489.         ;; Check to see if Component was found in configuration file
  490.         If [ComponentValue] = BlankString
  491.             [YesOrNo2] := NoCharacter
  492.         EndIf
  493.  
  494.     EndWhile
  495.  
  496. [Point2]        ;; Goto point incase of configuration file problems
  497.  
  498. EndProcedure
  499.  
  500. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  501. ;; Procedure will parse the library name string and call the correct 
  502. ;; install procedure to install the library 
  503. ;;
  504. Procedure ProcessLibraries
  505.  
  506.     ;; Begin loop to pull  off all compressed library names from component
  507.     ;; section These libaries can be from the LIBRARY or OPTLIB assignments
  508.     [YesOrNo3] := YesCharacter
  509.     while [YesOrNo3] = YesCharacter
  510.  
  511.         [ComponentLibrary] := BlankString
  512.  
  513.         ;; Get product information out of configuration file
  514.         [Number1] := PositionOf "," in [ComponentValue]
  515.         If [Number1] > 0
  516.             DecrementNumber [Number1]
  517.             [ComponentLibrary] := SubStringOf [ComponentValue] from Beginning to [Number1]
  518.  
  519.             IncrementNumber [Number1]    ;; Get back to the Comma
  520.             IncrementNumber [Number1]    ;; Move to next character after Comma
  521.             ;; trim first libray name and comma off the list
  522.             [ComponentValue] := SubStringOf [ComponentValue]  from [Number1] to End
  523.         Else
  524.             ;; This is the last library name in the comma separated list
  525.             [ComponentLibrary] := [ComponentValue]
  526.             [YesOrNo3]  := NoCharacter
  527.         EndIf
  528.  
  529.         [Number1] := MaxY     ;; Get the maximum vertical screen dimension
  530.         If [Number1] = 600     ;; If low resolution mode, change TextBox location
  531.                [Number1] := 92
  532.         Else
  533.             [Number1] := 210
  534.         Endif
  535.  
  536.         ;; The string [ProductValue] is same as directory name that contains
  537.         ;; the current products installation files
  538.         If DriveIsCDROM [InstallFromDrive]
  539.             TextBox @xy(Center,[Number1]) BlackOnLightGray UseHeader "Product: [ProductName]"
  540.                    Installing files for Option: [ComponentName]
  541.             EndTextBox
  542.         Else
  543.             If DriveIsRemoveable [InstallFromDrive]
  544.                 TextBox @xy(Center,[Number1]) BlackOnLightGray UseHeader "Product: [ProductName]"
  545.                     Installing files for floppy DiskSet:  [ComponentLibrary]
  546.                 EndTextBox
  547.             Else
  548.                 TextBox @xy(Center,[Number1]) BlackOnLightGray UseHeader "Product: [ProductName]"
  549.                     Installing files for Option: [ComponentName]
  550.                 EndTextBox
  551.             Endif
  552.         Endif
  553.  
  554.         ;; Now setup the new compressed library name, multiple compressed libraries
  555.         ;; in a component statement are to be on the same floppy disk
  556.         InstallSeries [ComponentLibrary] promptfor "Please insert disk number [DiskNumber] in drive [InstallFromDrive]:"
  557.  
  558.         If [YesOrNo4] = NoCharacter
  559.             ;; Call the procedure to merge the license files
  560.             Do MergeLicense
  561.             [YesOrNo4] := YesCharacter
  562.         EndIf
  563.  
  564.         ;; Call the product specific procedure to handle the individual
  565.         ;; compressed libraries for the current Product
  566.         Do [InstallProcedure]
  567.     
  568.         ClearScreen
  569.  
  570.     EndWhile
  571.  
  572. EndProcedure
  573.  
  574. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  575. ;; Procedure will execute  the statements needed to BEGIN installing
  576. ;; a product
  577. ;;
  578. Procedure GeneralProductBegin
  579.  
  580.     ;; Made change to InstallDllQuestion so that it will not ask the user
  581.     ;; the QUESTION of where to install this stuff
  582.     ;;  
  583.     [String1] := "F"
  584.     CallDLL [DLL1] InstallDllQuestion [String1] [ContextName] [ContextDescription] [DefaultDirectory] [ExeDirectory] [LibDirectory] [CfgDirectory] [ExaDirectory] [ExeSpace] [LibSpace] [CfgSpace] [ExaSpace]
  585.     Do CheckForQuit
  586.  
  587.     If FileExists [ExeDirectory]\[ProductValue].EXE
  588.         Dialog [YesOrNo1] UseHeader "Warning"
  589.             [ProductName] installation has detected a previous installation
  590.             of [ProductName].  Should installation continue?
  591.         EndDialog
  592.  
  593.         If [YesOrNo1] = N
  594.             Do ErrorFreeScript
  595.             SoLong
  596.         EndIf
  597.     EndIf
  598.  
  599. EndProcedure
  600.  
  601. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  602. ;; Procedure will execute the statements needed to BEGIN installing
  603. ;; a option (usually device kits)
  604. ;;
  605. Procedure GeneralOptionBegin
  606.  
  607.     Do CheckForEntry          ;; Check for Entry Product
  608.  
  609.     ;; Made change to InstallDllOption so that it will not display the
  610.     ;; location of where to install this stuff
  611.     ;;  
  612.     [String1] := "F"
  613.     CallDLL [DLL1] InstallDllOption [String1] [ContextName] [ProductDescription] [DefaultDirectory] [ExeDirectory] [LibDirectory] [CfgDirectory] [ExaDirectory] [ExeSpace] [LibSpace] [CfgSpace] [ExaSpace]
  614.     Do CheckForQuit
  615.  
  616. EndProcedure
  617.  
  618. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  619. ;; Procedure will execute the statements needed to install the files
  620. ;; from the compressed libraries
  621. ;;
  622. Procedure SynarioInstallFiles
  623.  
  624.     [InstallationDirectory] := [ExeDirectory]
  625.     QueFileGroup 1
  626.     Do InstallFileGroup
  627.     
  628.     [InstallationDirectory] := [LibDirectory]
  629.     QueFileGroup 2
  630.     Do InstallFileGroup
  631.  
  632.     [InstallationDirectory] := [CfgDirectory]
  633.     QueFileGroup 3
  634.     Do InstallFileGroup
  635.  
  636.     [InstallationDirectory] := [ExaDirectory]
  637.     QueFileGroup 4
  638.     Do InstallFileGroup
  639.  
  640. EndProcedure
  641.  
  642. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  643. ;; Procedure will execute the statements needed to install the files
  644. ;;  from the compressed libraries
  645. ;;
  646. Procedure AbelInstallFiles
  647.  
  648.     [InstallationDirectory] := [ExeDirectory]
  649.     QueFileGroup 5
  650.     Do InstallFileGroup
  651.  
  652.     [InstallationDirectory] := [LibDirectory]
  653.     QueFileGroup 6
  654.     Do InstallFileGroup
  655.  
  656.     [InstallationDirectory] := [CfgDirectory]
  657.     QueFileGroup 7
  658.     Do InstallFileGroup
  659.  
  660.     [InstallationDirectory] := [ExaDirectory]
  661.     QueFileGroup 8
  662.     Do InstallFileGroup
  663.  
  664. EndProcedure
  665.  
  666. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  667. ;; Procedure will execute the statements needed to install the files
  668. ;; from the compressed libraries
  669. ;;
  670. Procedure SecsInstallFiles
  671.  
  672.     [InstallationDirectory] := [ExeDirectory]
  673.     QueFileGroup 9
  674.     Do InstallFileGroup
  675.   
  676.     [InstallationDirectory] := [LibDirectory]
  677.     QueFileGroup 10
  678.     Do InstallFileGroup
  679.  
  680.     [InstallationDirectory] := [CfgDirectory]
  681.     QueFileGroup 11
  682.     Do InstallFileGroup
  683.  
  684.     [InstallationDirectory] := [ExaDirectory]
  685.     QueFileGroup 12
  686.     Do InstallFileGroup
  687.  
  688. EndProcedure
  689.  
  690. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  691. ;; Procedure will execute the statements needed to install the files
  692. ;; from the optional compressed libraries
  693. ;;
  694. Procedure OptionInstallFiles
  695.  
  696.     ;; Attempt to install any standard product pieces first
  697.     If [ProductFamily] = synario
  698.         Do SynarioInstallFiles
  699.     Else
  700.         If [ProductFamily] = synsngl
  701.             Do SynarioInstallFiles
  702.         Else
  703.                If [ProductFamily] = abel
  704.                 Do AbelInstallFIles
  705.             Else
  706.                 If [ProductFamily] = ablsngl
  707.                     Do AbelInstallFiles
  708.                 Else
  709.                     Do SecsInstallFiles
  710.                 EndIf
  711.             EndIf
  712.         EndIf
  713.     EndIf
  714.  
  715.     ;; After standard files, install all files into [OptDirectory]
  716.     ;; These files must be tagged with goup number 99
  717.  
  718.     If DirectoryExists [OptDirectory]
  719.  
  720.         ;; Need to set the [OptDirectory] path before calling install procedure
  721.         ;; Normally this path will be in the Registry and should be set in the
  722.         ;; ProductPreInstallFiles procedure
  723.   
  724.          [InstallationDirectory] := [OptDirectory]
  725.         QueFileGroup 20
  726.         Do InstallFileGroup
  727.         
  728.     Else
  729.         Dialog UseHeader "Error"
  730.             Error
  731.             The installation directory: [OptDirectory] does not exist.
  732.         EndDialog
  733.  
  734.         Do ErrorFreeScript
  735.         Goto [point1]
  736.         
  737.     EndIf    
  738.  
  739. EndProcedure
  740.  
  741. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  742. ;; Procedure will execute the statements needed to END installing
  743. ;; a product
  744. ;;
  745. Procedure GeneralProductEnd
  746.  
  747.     ;; Currently do nothing here
  748.     
  749. EndProcedure
  750.  
  751. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  752. ;; Procedure will execute the statements needed perfrom something before
  753. ;; installing the compressed product files
  754. ;;
  755. Procedure ISPStartPreInstallFiles
  756.  
  757.     ;; Call procedure to install MFC redistributed DLL's
  758.     Do InstallMFCredist
  759.  
  760.     [SemiDirectory] := EnvironmentStringFor PDSPLUS
  761.     [String1] := "                "
  762.     [String2] := "PDSPath" 
  763.     [String3] := "%PDSPLUS%"
  764.     CallDLL [DLL1] InstallDllRegisterPath [String1] [ContextName] [String2] [String3]
  765.  
  766.     Do CheckForQuit
  767.     
  768. EndProcedure
  769.  
  770. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  771. ;; Procedure will execute the statements needed perfrom something before
  772. ;; installing the compressed product files
  773. ;;
  774. Procedure ISPSystemPreInstallFiles
  775.  
  776.     Do ISPStartPreInstallFiles
  777.     
  778. EndProcedure
  779.  
  780. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  781. ;; Procedure will execute the statements needed perfrom something before
  782. ;; installing the compressed product files
  783. ;;
  784. Procedure ISPVHDLPreInstallFiles
  785.  
  786.     Do ISPStartPreInstallFiles
  787.     
  788. EndProcedure
  789.  
  790. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  791. ;; Procedure will execute the statements needed perfrom something before
  792. ;; installing the compressed product files
  793. ;;
  794. Procedure ISPStartPostInstallFiles
  795.  
  796.     ProgramManagerDDE
  797.         CreateGroup(ISP Synario)
  798.         ShowGroup(ISP Synario,1)
  799.         ReplaceItem(ISP Synario)
  800.         AddItem([ExeDirectory]\SYNPLSI.EXE,ISP Synario,[ExeDirectory]\SYNPLSI.EXE)
  801.         ReplaceItem(ISP Synario Readme)
  802.         AddItem([ExeDirectory]\README\READSTR.WRI,ISP Synario Readme,[ExeDirectory]\README\readstr.wri)
  803.     EndProgramManagerDDE
  804.  
  805.         Do OSspecificLibMgr
  806.     Do OSspecificSynDos
  807.     Do CopyStartLicense
  808.  
  809.     RegSetValue ClassesRoot .SYN\shell\open\command [ExeDirectory]\SYNPLSI.EXE %1
  810.  
  811.     Do ISPRegistry
  812.     Do CheckForQuit
  813.         
  814.  
  815.     [Array5][1] := Controls
  816.     [Array5][2] := Simulator
  817.     [Array5][3] := SimCP
  818.     [Array5][4] := [CfgDirectory]\ECS.INI
  819.     WritePrivateProfileString Using [Array5]
  820.  
  821.     Do RegisterDIOxfer
  822.  
  823. EndProcedure
  824.  
  825. Procedure EntryAddHelp
  826.  
  827.     SetCopyAttrTo 00
  828.     CopyTree from [ProductDirectory]..\readme to [ExeDirectory]\readme
  829.     ProgramManagerDDE
  830.         ReplaceItem(ReadMe)
  831.         AddItem([ExeDirectory]\readme\readme.hlp, ReadMe, [ExeDirectory]\readme\readme.hlp)
  832.  
  833.         ReplaceItem(Release Notes)
  834.         AddItem([ExeDirectory]\readme\filelist.pdf, Release Notes, [ExeDirectory]\readme\filelist.pdf)
  835.        EndProgramManagerDDE
  836.     
  837. EndProcedure
  838.  
  839. Procedure OSspecificLibMgr
  840.  
  841.     If (WindowsNT) .OR. (WindowsVersion >= 3.9) ;; if WinNT or Win95
  842.         DeleteFiles from [ExeDirectory] {Quietly}
  843.             libmgr.exe
  844.         EndDeleteFiles
  845.         RenameFile [ExeDirectory]\libmgr32.exe to libmgr.exe
  846.     else                            
  847.         DeleteFiles from [ExeDirectory] {Quietly}
  848.              libmgr32.exe
  849.     EndDeleteFiles
  850.     EndIf 
  851.  
  852. EndProcedure
  853.  
  854. Procedure OSspecificSynDos
  855.  
  856.     If WindowsVersion >= 3.9 ;; if Win95
  857.         DeleteFiles from [ExeDirectory] {Quietly}
  858.             syndos.pif
  859.         EndDeleteFiles
  860.         RenameFile [ExeDirectory]\syndos95.pif to syndos.pif
  861.     else
  862.         DeleteFiles from [ExeDirectory] {Quietly}
  863.             syndos.pif
  864.         EndDeleteFiles
  865.         RenameFile [ExeDirectory]\syndos31.pif to syndos.pif
  866.     EndIf 
  867.  
  868. EndProcedure
  869.  
  870. Procedure CopyStartLicense
  871.  
  872.     DeleteFiles from [LicenseDirectory] {Quietly}
  873.         lic00000.dat
  874.     EndDeleteFiles
  875.     RenameFile [LicenseDirectory]\licstart.dat to lic00000.dat
  876.  
  877. EndProcedure
  878.  
  879. Procedure ISPRegistry
  880.     [String1] := "                "
  881.     [String2] := "ProductTitle"
  882.     [String3] := "ISP Synario"
  883.     CallDLL [DLL1] InstallDllRegisterSpecific [String1] [ContextName] [String2] [String3]
  884.  
  885.     [SemiDirectory] := Stub out Manuals, Tutorials, Application Notes 
  886.     [String1] := "                "
  887.     [String2] := "Tutorial" 
  888.     [String3] := "%PDSPLUS%\config"
  889.     CallDLL [DLL1] InstallDllRegisterPath [String1] [ContextName] [String2] [String3]
  890.     [String1] := "                "
  891.     [String2] := "Appnotes" 
  892.     [String3] := ""
  893.     CallDLL [DLL1] InstallDllRegisterPath [String1] [ContextName] [String2] [String3]
  894. EndProcedure
  895. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  896. ;; Procedure will execute the statements needed perfrom something before
  897. ;; installing the compressed product files
  898. ;;
  899. Procedure ISPSystemPostInstallFiles
  900.  
  901.     ProgramManagerDDE
  902.         CreateGroup(ISP Synario)
  903.         ShowGroup(ISP Synario,1)
  904.         ReplaceItem(ISP Synario)
  905.         AddItem([ExeDirectory]\SYNPLSI.EXE,ISP Synario,[ExeDirectory]\SYNPLSI.EXE)
  906.         ReplaceItem(ISP Synario Readme)
  907.         AddItem([ExeDirectory]\README\READSYS.WRI,ISP Synario Readme,[ExeDirectory]\README\readsys.wri)
  908.  
  909.     EndProgramManagerDDE
  910.     
  911.         Do OSspecificLibMgr
  912.     Do OSspecificSynDos
  913.     Do CopySystemLicense
  914.  
  915.     RegSetValue ClassesRoot .SYN\shell\open\command [ExeDirectory]\SYNPLSI.EXE %1
  916.  
  917.     Do ISPRegistry
  918.     Do CheckForQuit
  919.  
  920.     [Array5][1] := Controls
  921.     [Array5][2] := Simulator
  922.     [Array5][3] := SimCP
  923.     [Array5][4] := [CfgDirectory]\ECS.INI
  924.     WritePrivateProfileString Using [Array5]
  925.  
  926.     Do RegisterDIOxfer
  927.  
  928. EndProcedure
  929.  
  930. Procedure OSspecificSynDos
  931.  
  932.     If WindowsVersion >= 3.9 ;; if Win95
  933.         DeleteFiles from [ExeDirectory] {Quietly}
  934.             syndos.pif
  935.         EndDeleteFiles
  936.         RenameFile [ExeDirectory]\syndos95.pif to syndos.pif
  937.     else
  938.         DeleteFiles from [ExeDirectory] {Quietly}
  939.             syndos.pif
  940.         EndDeleteFiles
  941.         RenameFile [ExeDirectory]\syndos31.pif to syndos.pif
  942.     EndIf 
  943.  
  944. EndProcedure
  945.  
  946. Procedure CopySystemLicense
  947.  
  948.     DeleteFiles from [LicenseDirectory] {Quietly}
  949.         lic00000.dat
  950.     EndDeleteFiles
  951.     RenameFile [LicenseDirectory]\licsystm.dat to lic00000.dat
  952.  
  953. EndProcedure
  954. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  955. ;; Procedure will execute the statements needed perfrom something before
  956. ;; installing the compressed product files
  957. ;;
  958. Procedure ISPVHDLPostInstallFiles
  959.  
  960.     ProgramManagerDDE
  961.         CreateGroup(ISP Synario)
  962.         ShowGroup(ISP Synario,1)
  963.         ReplaceItem(ISP Synario)
  964.         AddItem([ExeDirectory]\SYNPLSI.EXE,ISP Synario,[ExeDirectory]\SYNPLSI.EXE)
  965.         ReplaceItem(ISP Synario Readme)
  966.         ReplaceItem(ISP Synario Readme)
  967.         AddItem([ExeDirectory]\README\READVHD.WRI,ISP Synario Readme,[ExeDirectory]\README\readvhd.wri)
  968.     EndProgramManagerDDE
  969.  
  970.     Do OSspecificLibMgr
  971.     Do OSspecificSynDos
  972.     Do CopyVHDLLicense
  973.  
  974.     RegSetValue ClassesRoot .SYN\shell\open\command [ExeDirectory]\SYNPLSI.EXE %1
  975.  
  976.     Do ISPRegistry
  977.     Do CheckForQuit
  978.  
  979.     [Array5][1] := Controls
  980.     [Array5][2] := Simulator
  981.     [Array5][3] := SimCP
  982.     [Array5][4] := [CfgDirectory]\ECS.INI
  983.     WritePrivateProfileString Using [Array5]
  984.  
  985.     Do RegisterDIOxfer
  986.  
  987. EndProcedure
  988.  
  989. Procedure OSspecificSynDos
  990.  
  991.     If WindowsVersion >= 3.9 ;; if Win95
  992.         DeleteFiles from [ExeDirectory] {Quietly}
  993.             syndos.pif
  994.         EndDeleteFiles
  995.         RenameFile [ExeDirectory]\syndos95.pif to syndos.pif
  996.     else
  997.         DeleteFiles from [ExeDirectory] {Quietly}
  998.             syndos.pif
  999.         EndDeleteFiles
  1000.         RenameFile [ExeDirectory]\syndos31.pif to syndos.pif
  1001.     EndIf 
  1002.  
  1003. EndProcedure
  1004.  
  1005. Procedure CopyVHDLLicense
  1006.  
  1007.     DeleteFiles from [LicenseDirectory] {Quietly}
  1008.         lic00000.dat
  1009.     EndDeleteFiles
  1010.     RenameFile [LicenseDirectory]\licvhdl.dat to lic00000.dat
  1011.  
  1012. EndProcedure
  1013.  
  1014. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1015. ;;  Beginning of General Procedures here
  1016. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1017.  
  1018. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1019. ;;  Procedure shows the build version number for the product 
  1020. ;;
  1021. Procedure ShowBuildVersion
  1022.  
  1023. ;; This procedure is not needed, as the build nos can be seen from DIOREG
  1024. ;; We still retain this procedure because, a lot of preproc.inc files 
  1025. ;; reference this procedure
  1026.  
  1027. EndProcedure
  1028.  
  1029. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1030.  
  1031. Procedure DDENonfatalErrorTrap
  1032.   [Number9] := PositionOf "ShowGroup" in DDENonFatalError
  1033.   If [Number9] > 0
  1034.     Dialog UseHeader "Warning"
  1035.       Install is not able to switch to the
  1036.       Program group.  You may have reached the limit
  1037.       of Program Manager groups.  Icons will be made
  1038.       in the current Program Manager group.
  1039.     EndDialog
  1040.   EndIf  
  1041. EndProcedure
  1042.  
  1043. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1044.  
  1045. Procedure InstallFileGroup
  1046.   If FreeSpaceOnDrive InstallationDrive <= QueSize
  1047.     Dialog UseHeader "Warning"
  1048.       There may not be enough free space to install files.
  1049.     EndDialog
  1050.   EndIf
  1051.  
  1052.   SetMouseCursor Wait
  1053.  
  1054.   GetQuedFiles
  1055.   UnQueAllFiles
  1056.   SetMouseCursor Arrow
  1057.   
  1058. EndProcedure
  1059.  
  1060. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1061.  
  1062. Procedure CheckForExtraDlls
  1063.   [String1] := "                                             "
  1064.   [String3] := "      "
  1065.   LoadDll [Dll2] ShadowDirectory\INSTDLL.DLL
  1066.   CallDLL [DLL2] InstallDllSecondInstall [String1]
  1067.   CallDLL [DLL2] InstallDllCheckForDos [String3]
  1068.   UnloadDll [Dll2]
  1069.  
  1070.   If "[String1]" = Error
  1071.     Dialog UseHeader "Error"
  1072.       Error
  1073.       Previous install detected.
  1074.       Run only one install at a time.
  1075.     EndDialog
  1076.     SoLong
  1077.   EndIf
  1078.  
  1079.   [String1] := "                                            "
  1080.   [String2] := "                                            "
  1081.   LoadDll [Dll2] ShadowDirectory\INSTDLL.DLL
  1082.   CallDLL [DLL2] InstallDllInstallDlls [String1] [String2]
  1083.   UnloadDll [Dll2]
  1084.  
  1085.   If "[String1]" = "Error"
  1086.     Dialog UseHeader "Error"
  1087.       [String2]
  1088.       must be closed before running SETUP.EXE
  1089.     EndDialog
  1090.     SoLong
  1091.   EndIf
  1092.  
  1093.   [Number1] := PositionOf "Q" in [String3]
  1094.   If [Number1] <> 0
  1095.     SoLong
  1096.   EndIf
  1097. EndProcedure
  1098.  
  1099. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1100.  
  1101. Procedure QueToShadowDirectory
  1102.   [InstallationDirectory] := ShadowDirectory
  1103.   QueFileGroup 14
  1104.   GetQuedFiles Quietly 
  1105.   QueFiles
  1106.     CTL3D.DL0
  1107.   EndQueFiles
  1108.   GetQuedFiles Quietly 
  1109. EndProcedure
  1110.  
  1111. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1112.  
  1113. Procedure DeleteFromShadowDirectory
  1114. [String9] := ShadowDirectory  
  1115.   DeleteFiles from [String9]
  1116.     INSTDLL.DLL
  1117.     WINEXEC.DLL
  1118.     CTL3D.DL0
  1119.     DIOEDA.DLL
  1120.     CHKVER.EXE
  1121.   EndDeleteFiles
  1122. EndProcedure
  1123.  
  1124. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1125.  
  1126. Procedure QueOption
  1127.   [InstallationDirectory] := ShadowDirectory
  1128.   
  1129.   SetMouseCursor Wait
  1130.   
  1131.   QueFileGroup 14
  1132.   GetQuedFiles Quietly 
  1133.   
  1134.   SetMouseCursor Arrow
  1135.   
  1136. EndProcedure
  1137.  
  1138. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1139.  
  1140. Procedure SetupCTL3D
  1141.  
  1142.   If FileExists [WindowsSystemDirectory]\CTL3D.DLL
  1143.   
  1144.     [NewVersion] := FileVersionOf ShadowDirectory\CTL3D.DL0
  1145.     [OriginalVersion] := FileVersionOf [WindowsSystemDirectory]\CTL3D.DLL
  1146.     If [NewVersion] > [OriginalVersion]
  1147.  
  1148.       ;;CopyFiles from ShadowDirectory to [WindowsSystemDirectory] Quietly
  1149.       SetCopyAttrTo 00
  1150.       CopyFiles from ShadowDirectory to [WindowsSystemDirectory] 
  1151.         CTL3D.DL0 as CTL3D.DLL
  1152.       EndCopyFiles
  1153.       SetCopyAttrTo 01
  1154.              
  1155.     EndIF
  1156.     
  1157.   Else
  1158.   
  1159.     ;; CopyFiles from ShadowDirectory to [WindowsSystemDirectory] Quietly
  1160.     SetCopyAttrTo 00
  1161.     CopyFiles from ShadowDirectory to [WindowsSystemDirectory] 
  1162.       CTL3D.DL0 as CTL3D.DLL
  1163.     EndCopyFiles
  1164.     SetCopyAttrTo 01
  1165.     
  1166.   EndIf
  1167.  
  1168. EndProcedure
  1169.  
  1170. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1171.  
  1172. ;; Called after calling a DLL function
  1173. Procedure CheckForQuit
  1174.   [Number1] := PositionOf "Q" in [String1]
  1175.   If [Number1] <> 0
  1176.     CallDLL [DLL1] InstallDllCtl3dUnregister [String1]
  1177.     UnloadDLL [DLL3]
  1178.     UnloadDLL [DLL1]
  1179.     SoLong
  1180.   EndIf
  1181. EndProcedure
  1182.  
  1183. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1184.  
  1185. Procedure CheckForEntry
  1186.  
  1187.   [String2] := "                                                             "
  1188.   CallDLL [DLL1] InstallDllCheckForEntryQuietly [String1] [ContextName] [String2]
  1189.   [Number1] := PositionOf "Q" in [String1]
  1190.   If [Number1] <> 0
  1191.       Dialog UseHeader "Error"
  1192.           Cannot find [ContextDescription] installation.
  1193.           Install [ContextDescription] before [ProductName].
  1194.       EndDialog
  1195.       Do ErrorFreeScript
  1196.       SoLong
  1197.   EndIf
  1198.  
  1199.   If DirectoryExists [String2]
  1200.   Else
  1201.       Dialog UseHeader "Error"
  1202.           Cannot find [ContextDescription] installation.
  1203.           Install [ContextDescription] before [ProductName].
  1204.       EndDialog
  1205.       Do ErrorFreeScript
  1206.       SoLong
  1207.   EndIf
  1208.   
  1209. EndProcedure
  1210.  
  1211. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1212.  
  1213. Procedure CheckForVersion
  1214.  
  1215.     [String2] := "                                                             "
  1216.     CallDLL [DLL1] InstallDllCheckForVer [String1] [ContextName] [String2]
  1217.  
  1218.     If "[StringVersion]" > "[String2]"
  1219.     
  1220.         Dialog UseHeader "Installation Error"
  1221.             [ProductName] installation requires at least
  1222.             [StringName] [StringVersion]. Please, install
  1223.             [StringName] [StringVersion] before [ProductName].
  1224.         EndDialog
  1225.         Do ErrorFreeScript    
  1226.         SoLong
  1227.         
  1228.     EndIf
  1229.     
  1230. EndProcedure
  1231.  
  1232. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1233.  
  1234. Procedure InitScript
  1235.  
  1236.     [ExeDirectory] := "                                                           "
  1237.     [LibDirectory] := "                                                           "
  1238.     [CfgDirectory] := "                                                           "
  1239.     [ExaDirectory] := "                                                           "
  1240.     [LicenseDirectory] := "                                                          "
  1241.  
  1242.     LoadDLL [DLL1] ShadowDirectory\INSTDLL.DLL
  1243.     LoadDLL [DLL3] [WindowsSystemDirectory]\CTL3D.DLL
  1244.     CallDLL [DLL1] DllCtl3dRegister [String1]
  1245.  
  1246. EndProcedure
  1247.  
  1248. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1249.  
  1250. Procedure CleanupDll
  1251.  
  1252.     CallDLL [DLL1] InstallDllCtl3dUnregister [String1]
  1253.     UnloadDLL [DLL1]
  1254.     UnloadDLL [DLL3]
  1255.  
  1256. EndProcedure
  1257.  
  1258. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1259.  
  1260. Procedure FreeScript
  1261.  
  1262.     If FileExists [ExeDirectory]\DIOREG.EXE
  1263.         If (WindowsNT) 
  1264.             Dialog [YesOrNo1] UseHeader "Install"
  1265.                 The Synario Design Automation 'Registration Editor' must be
  1266.                 run after you have installed all of the software you wish to
  1267.                 use. The Security Key device drivers must have been installed
  1268.                 before running the Registration Editor. Use the "Drivers"
  1269.                 icon in the Control Panel to install. 
  1270.  
  1271.                 Do you want to run the Registration Editor now?
  1272.             EndDialog
  1273.         Else    
  1274.             Dialog [YesOrNo1] UseHeader "Install"
  1275.                 The Synario Design Automation 'Registration Editor' must be run
  1276.                 after you have installed all of the software you wish to use.
  1277.  
  1278.                 Do you want to run the Registration Editor now?
  1279.             EndDialog
  1280.         Endif
  1281.  
  1282.         CallDLL [DLL1] InstallDllCtl3dUnregister [String1]
  1283.         UnloadDLL [DLL1]
  1284.         UnloadDLL [DLL3]
  1285.  
  1286.         If [YesOrNo1] = Y
  1287.             [String1] := [ExeDirectory]\DIOREG.EXE
  1288.             LoadDLL [DLL1] ShadowDirectory\WINEXEC.DLL
  1289.             CallDLL [DLL1] InstallDllWinExec [String1]
  1290.             UnloadDLL [DLL1]
  1291.         EndIf
  1292.     Else
  1293.         CallDLL [DLL1] InstallDllCtl3dUnregister [String1]
  1294.         UnloadDLL [DLL1]
  1295.         UnloadDLL [DLL3]
  1296.     EndIf
  1297.  
  1298.     Do DeleteFromShadowDirectory
  1299.   
  1300. EndProcedure
  1301.  
  1302. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1303.  
  1304. Procedure ErrorFreeScript
  1305.  
  1306.     CallDLL [DLL1] InstallDllCtl3dUnregister [String1]
  1307.     UnloadDLL [DLL1]
  1308.     UnloadDLL [DLL3]
  1309.  
  1310.     Do DeleteFromShadowDirectory
  1311.  
  1312. EndProcedure
  1313.  
  1314. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1315.  
  1316. Procedure CheckForWin32s
  1317.   If (WindowsNT) .OR. (WindowsVersion >= 3.9)
  1318.     ;; Do nothing, Win NT or 95 
  1319.   Else
  1320.     ;; Look for WIN32S on network or CDROM
  1321.     [String1] := [InstallFromDirectory]\WIN32S\DISK1\SETUP.EXE
  1322.     [Array3][1] := Win32s
  1323.     [Array3][2] := Version
  1324.     [Array3][3] := 0.0.0.0
  1325.     [Array3][4] := [InstallFromDirectory]\WIN32S\DISK1\WIN32S.VER
  1326.     GetPrivateProfileString Using [Array3]
  1327.  
  1328.     ;; Get current WIN32S version
  1329.     [Array4][1] := Win32s
  1330.     [Array4][2] := Version
  1331.     [Array4][3] := 0.0.0.0
  1332.     [Array4][4] := [WindowsSystemDirectory]\WIN32S.INI
  1333.     GetPrivateProfileString Using [Array4]
  1334.  
  1335.     If "[Array3][5]" = "0.0.0.0"
  1336.       ;; Not a network or CDROM install because WIN32S.VER was not found.
  1337.       [String1] := [InstallFromDirectory]\SETUP.EXE
  1338.       [Point2]
  1339.       Dialog UseHeader "Install"
  1340.         Insert Microsoft Win32s Setup Disk 1.
  1341.       EndDialog
  1342.       [Array3][1] := Win32s
  1343.       [Array3][2] := Version
  1344.       [Array3][3] := 0.0.0.0
  1345.       [Array3][4] := [InstallFromDirectory]\WIN32S.VER
  1346.       GetPrivateProfileString Using [Array3]
  1347.       If "[Array3][5]" = "0.0.0.0"
  1348.         GoTo [Point2]
  1349.       EndIf
  1350.     EndIf
  1351.  
  1352.     ;; Call WIN32S setup program if newer version is on disk
  1353.     If "[Array3][5]" > "[Array4][5]"
  1354.       LoadDLL [DLL3] ShadowDirectory\WINEXEC.DLL
  1355.       CallDLL [DLL3] InstallDllWinExec [String1]
  1356.       UnloadDLL [DLL3]
  1357.     EndIf
  1358.   EndIf
  1359. EndProcedure
  1360.  
  1361. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1362.  
  1363. Procedure WelcomeMessage
  1364.  
  1365.   ;; This proceudre is currently NOT used for the CD-ROM install
  1366.  
  1367.   Dialog UseHeader "[CommandLine2] Install"
  1368.     Welcome to the [CommandLine2] installation.
  1369.  
  1370.     The minimum system requirements are:
  1371.     Microsoft Windows 3.1
  1372.     386 25Mhz CPU
  1373.     8 megabytes of memory
  1374.     MS-DOS 5.0
  1375.     SVGA 800 by 600
  1376.   EndDialog
  1377. EndProcedure
  1378.  
  1379. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1380.  
  1381. Procedure FinishedMessage
  1382.  
  1383.     Dialog UseHeader "Install"     
  1384.         Finished installation.     
  1385.     EndDialog
  1386. EndProcedure
  1387.  
  1388. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1389.  
  1390. Procedure MergeLicense
  1391.  
  1392.     If [ProductLicenseTemplate] <> BlankString
  1393.  
  1394.         [String1] := "               "
  1395.         CallDLL [DLL1] InstallDllGetLicensePath [String1] [ContextName] [LicenseDirectory]
  1396.         Do CheckForQuit
  1397.  
  1398.         [InstallationDirectory] := [LicenseDirectory]
  1399.   
  1400.         ;; License files are no longer in the compress libraries
  1401.         If FileExists [InstallFromDirectory]\[ProductLicenseTemplate]
  1402.         
  1403.             SetCopyAttrTo 00
  1404.             CopyFiles from [InstallFromDirectory] Quietly
  1405.                 [ProductLicenseTemplate]
  1406.             EndCopyFiles
  1407.             SetCopyAttrTo 01  ;; read only should be default (NoChange does not work)
  1408.  
  1409.             [String1] := "                "
  1410.             CallDLL [DLL1] InstallDllMergeLicense [String1] [ProductLicenseTemplate]
  1411.             Do CheckForQuit
  1412.  
  1413.             DeleteFiles from [LicenseDirectory] Quietly
  1414.                 [ProductLicenseTemplate]
  1415.             EndDeleteFiles
  1416.  
  1417.         Else
  1418.             Dialog UseHeader "Error"
  1419.                 Cannot find license file [ProductLicenseTemplate].
  1420.             EndDialog
  1421.         EndIf
  1422.     EndIf
  1423.  
  1424. EndProcedure
  1425.  
  1426. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1427.  
  1428. Procedure InstallHyprHelpDll
  1429.  
  1430.     ;; Copy all files from Install group 14 into shadow directory
  1431.     Do QueOption
  1432.  
  1433.     [NewDll] := "CTL3DV2"
  1434.     Do InstallSystemDll
  1435.  
  1436.     [NewDll] := "DIOHELP"
  1437.     Do InstallSystemDll
  1438.  
  1439.     [NewDll] := "HYPRFIND"
  1440.     Do InstallSystemDll
  1441.  
  1442.     [NewDll] := "HYPRVIEW"
  1443.     Do InstallSystemDll
  1444.  
  1445.     [NewDll] := "HYPERTOP"
  1446.     Do InstallSystemDll
  1447.  
  1448.     [NewDll] := "CNT31"
  1449.     Do InstallSystemDll
  1450.  
  1451.     [NewDll] := "INETWH16"
  1452.     Do InstallSystemDll
  1453.  
  1454.     [NewDll] := "INETWH32"
  1455.     Do InstallSystemDll
  1456.  
  1457.     If FileExists ShadowDirectory\HYPRVIEW.HLP
  1458.         SetCopyAttrTo 00
  1459.         CopyFiles from ShadowDirectory to [WindowsDirectory] Quietly
  1460.             HYPRVIEW.HLP as HYPRVIEW.HLP
  1461.         EndCopyFiles
  1462.         SetCopyAttrTo 01 ;; read only should be default (NoChange does not work)
  1463.         
  1464.         [String1] := "                "
  1465.         [String2] := "Manuals"
  1466.         [String3] := [InstallFromDrive]:\Manuals
  1467.         CallDLL [DLL1] InstallDllRegisterPath [String1] [ContextName] [String2] [String3]
  1468.         
  1469.     Endif
  1470.  
  1471.     DeleteFiles from ShadowDirectory
  1472.         CTL3DV2.DL0
  1473.         DIOHELP.DL0
  1474.         HYPRFIND.DL0
  1475.         HYPRVIEW.DL0
  1476.         HYPERTOP.DL0
  1477.         CNT31.DL0
  1478.         INETWH16.DL0
  1479.         INETWH32.DL0
  1480.         HYPRVIEW.HLP
  1481.     EndDeleteFiles
  1482.  
  1483. EndProcedure
  1484.  
  1485. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1486.  
  1487. Procedure InstallMFCredist
  1488.  
  1489.     ;; Set the Directory path  from which files will be pulled from
  1490.     [InstallFromDirectory] := [SetupDirectory]\redist
  1491.  
  1492.     [Number1] := MaxY     ;; Get the maximum vertical screen dimension
  1493.     If [Number1] = 600     ;; If low resolution mode, change TextBox location
  1494.            [Number1] := 92
  1495.     Else
  1496.         [Number1] := 210
  1497.     Endif
  1498.  
  1499.     ;; The string [ProductValue] is same as directory name that contains
  1500.     ;; the current products installation files
  1501.     If DriveIsCDROM [InstallFromDrive]
  1502.         TextBox @xy(Center,[Number1]) BlackOnLightGray UseHeader "Product: [ProductValue]"
  1503.             Installing files for Option: MFC Redistribution Library
  1504.         EndTextBox
  1505.     Else
  1506.         If DriveIsRemoveable [InstallFromDrive]
  1507.             TextBox @xy(Center,[Number1]) BlackOnLightGray UseHeader "Product: [ProductValue]"
  1508.                 Installing files for floppy DiskSet:  REDIST
  1509.             EndTextBox
  1510.         Else
  1511.             TextBox @xy(Center,[Number1]) BlackOnLightGray UseHeader "Product: [ProductValue]"
  1512.                 Installing files for Option: MFC Redistribution Library
  1513.             EndTextBox
  1514.         Endif
  1515.     Endif
  1516.  
  1517.     InstallSeries Redist promptfor "Please insert disk number 1 in drive [InstallFromDrive]:"
  1518.     If WindowsNT
  1519.         Do InstallNtDlls
  1520.     Else
  1521.         If WindowsVersion >= 3.9
  1522.             Do InstallW95Dlls
  1523.         Else
  1524.             Do InstallWin31Dlls
  1525.         Endif
  1526.     EndIf
  1527.     
  1528.     ;; Install the HyperHelp dlls
  1529.     Do InstallHyprHelpDll
  1530.     
  1531.     ;; Set the Directory path back to where product files will be pulled from
  1532.     [InstallFromDirectory] := [SetupDirectory]\[FromDirectory]
  1533.  
  1534.     ClearScreen
  1535.  
  1536. EndProcedure
  1537.  
  1538. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1539.  
  1540. Procedure InstallWin31Dlls
  1541.  
  1542.   QueFiles to ShadowDirectory
  1543.     MFCOLEUI.DL0
  1544.     MFC30.DL0
  1545.     MFC40.DL0
  1546.     MSVCRT20.W32
  1547.     MSVCRT40.W32
  1548.     CTL3DV2.DL0
  1549.   EndQueFiles
  1550.   GetQuedFiles
  1551.  
  1552.   DeleteFiles from ShadowDirectory
  1553.     MSVCRT20.DL0
  1554.     MSVCRT40.DL0
  1555.   EndDeleteFiles
  1556.  
  1557.   RenameFile ShadowDirectory\MSVCRT20.W32 to MSVCRT20.DL0
  1558.   RenameFile ShadowDirectory\MSVCRT40.W32 to MSVCRT40.DL0  
  1559.  
  1560.   [NewDll] := "MFCOLEUI"
  1561.   Do InstallSystemDll
  1562.   [NewDll] := "MFC30"
  1563.   Do InstallSystemDll
  1564.   [NewDll] := "MFC40"
  1565.   Do InstallSystemDll
  1566.   [NewDll] := "MSVCRT20"
  1567.   Do InstallSystemDll
  1568.   [NewDll] := "MSVCRT40"
  1569.   Do InstallSystemDll
  1570.   [NewDll] := "CTL3DV2"
  1571.   Do InstallSystemDll
  1572.  
  1573.   DeleteFiles from ShadowDirectory
  1574.     MFCOLEUI.DL0
  1575.     MFC30.DL0
  1576.     MFC40.DL0
  1577.     MSVCRT20.DL0
  1578.     MSVCRT40.DL0
  1579.     CTL3DV2.DL0
  1580.   EndDeleteFiles
  1581.  
  1582. EndProcedure
  1583.  
  1584. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1585.  
  1586. Procedure InstallW95Dlls
  1587.   QueFiles to ShadowDirectory
  1588.     MFCOLEUI.DL0
  1589.     MFCANS32.DL0
  1590.     MSVCRT20.DL0
  1591.     MSVCRT40.DL0
  1592.     MFC30.DL0
  1593.     MFC40.DL0
  1594.     MFC42.DL0
  1595.     MSVCRT.DL0
  1596.     MFCO30.DL0
  1597.     MFCUIA32.DL0
  1598.     CTL3D32.W95
  1599.   EndQueFiles
  1600.   GetQuedFiles
  1601.  
  1602.   DeleteFiles from ShadowDirectory
  1603.     CTL3D32.DL0
  1604.   EndDeleteFiles
  1605.   RenameFile ShadowDirectory\CTL3D32.W95 to CTL3D32.DL0
  1606.  
  1607.   [NewDll] := "MFCOLEUI"
  1608.   Do InstallSystemDll
  1609.   [NewDll] := "MFCANS32"
  1610.   Do InstallSystemDll
  1611.   [NewDll] := "MSVCRT20"
  1612.   Do InstallSystemDll
  1613.   [NewDll] := "MSVCRT40"
  1614.   Do InstallSystemDll
  1615.   [NewDll] := "MFC30"
  1616.   Do InstallSystemDll
  1617.   [NewDll] := "MFC40"
  1618.   Do InstallSystemDll
  1619.   [NewDll] := "MFC42"
  1620.   Do InstallSystemDll
  1621.   [NewDll] := "MSVCRT"
  1622.   Do InstallSystemDll
  1623.   [NewDll] := "MFCO30"
  1624.   Do InstallSystemDll
  1625.   [NewDll] := "MFCUIA32"
  1626.   Do InstallSystemDll
  1627.   [NewDll] := "CTL3D32"
  1628.   Do InstallSystemDll
  1629.  
  1630.   DeleteFiles from ShadowDirectory
  1631.     MFCOLEUI.DL0
  1632.     MFCANS32.DL0
  1633.     MSVCRT20.DL0
  1634.     MSVCRT40.DL0
  1635.     MFC30.DL0
  1636.     MFC40.DL0
  1637.     MFC42.DL0
  1638.     MSVCRT.DL0
  1639.     MFCO30.DL0
  1640.     MFCUIA32.DL0
  1641.     CTL3D32.DL0
  1642.   EndDeleteFiles
  1643. EndProcedure
  1644.  
  1645. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1646.  
  1647. Procedure InstallNtDlls
  1648.   QueFiles to ShadowDirectory
  1649.     MSVCRT20.DL0
  1650.     MSVCRT40.DL0
  1651.     MFCOLEUI.DL0
  1652.     MFC30.DL0
  1653.     MFC40.DL0
  1654.     MFC42.DL0
  1655.     MSVCRT.DL0
  1656.     MFCO30.DL0
  1657.     MFCUIA32.DL0
  1658.     MFCANS32.DL0
  1659.     CTL3D32.DL0
  1660.     CTL3DV2.DL0
  1661.   EndQueFiles
  1662.   GetQuedFiles
  1663.  
  1664.   [NewDll] := "MSVCRT20"
  1665.   Do InstallSystem32Dll
  1666.   [NewDll] := "MSVCRT40"
  1667.   Do InstallSystem32Dll
  1668.   [NewDll] := "MFCOLEUI"
  1669.   Do InstallSystem32Dll
  1670.   [NewDll] := "MFC30"
  1671.   Do InstallSystem32Dll
  1672.   [NewDll] := "MFC40"
  1673.   Do InstallSystem32Dll
  1674.   [NewDll] := "MFC42"
  1675.   Do InstallSystem32Dll
  1676.   [NewDll] := "MSVCRT"
  1677.   Do InstallSystem32Dll
  1678.   [NewDll] := "MFCO30"
  1679.   Do InstallSystem32Dll
  1680.   [NewDll] := "MFCUIA32"
  1681.   Do InstallSystem32Dll
  1682.   [NewDll] := "MFCANS32"
  1683.   Do InstallSystem32Dll
  1684.   [NewDll] := "CTL3D32"
  1685.   Do InstallSystem32Dll
  1686.   [NewDll] := "CTL3DV2"      ;; This is a 16 bit dll
  1687.   Do InstallSystemDll
  1688.  
  1689.   DeleteFiles from ShadowDirectory
  1690.     MSVCRT20.DL0
  1691.     MSVCRT40.DL0
  1692.     MFCOLEUI.DL0
  1693.     MFC30.DL0
  1694.     MFC40.DL0
  1695.     MFC42.DL0
  1696.     MSVCRT.DL0
  1697.     MFCO30.DL0
  1698.     MFCUIA32.DL0
  1699.     MFCANS32.DL0
  1700.     CTL3D32.DL0
  1701.     CTL3DV2.DL0
  1702.   EndDeleteFiles
  1703.  
  1704. EndProcedure
  1705.  
  1706. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1707. ;; Installs a DLL if needed.
  1708. ;; Variable NewDll is the base name of the DLL file. The DLL with
  1709. ;; the extension .DL0 must be in the ShadowDirectory
  1710. ;;
  1711. Procedure InstallSystemDll
  1712.   If FileExists [WindowsSystemDirectory]\[NewDll].DLL
  1713.  
  1714.     [NewVersion] := FileVersionOf ShadowDirectory\[NewDll].DL0
  1715.     [OriginalVersion] := FileVersionOf [WindowsSystemDirectory]\[NewDll].DLL
  1716.     If [NewVersion] > [OriginalVersion]
  1717.     
  1718.       SetCopyAttrTo 00
  1719.       CopyFiles from ShadowDirectory to [WindowsSystemDirectory] Quietly
  1720.         [NewDll].DL0 as [NewDll].DLL
  1721.       EndCopyFiles
  1722.       SetCopyAttrTo 01
  1723.       
  1724.     EndIf
  1725.     
  1726.   Else
  1727.  
  1728.     SetCopyAttrTo 00
  1729.     CopyFiles from ShadowDirectory to [WindowsSystemDirectory] Quietly
  1730.       [NewDll].DL0 as [NewDll].DLL
  1731.     EndCopyFiles
  1732.     SetCopyAttrTo 01
  1733.     
  1734.   EndIf
  1735.   
  1736. EndProcedure
  1737.  
  1738. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1739. ;; Installs a DLL if needed (in Windows NT directory).
  1740. ;; Variable NewDll is the base name of the DLL file. The DLL with
  1741. ;; the extension .DL0 must be in the ShadowDirectory
  1742. ;;
  1743. Procedure InstallSystem32Dll
  1744.  
  1745.     If FileExists [WindowsDirectory]\SYSTEM32\[NewDll].DLL
  1746.  
  1747.        [String1] := "                "
  1748.        [String2] := ShadowDirectory\[NewDll].DL0
  1749.        [String3] := [WindowsDirectory]\SYSTEM32\[NewDll].DLL
  1750.        CallDLL [DLL1] InstallDllGetDll32Version [String1] [String2] [String3]
  1751.  
  1752.        If "[String1]" = "YES"
  1753.  
  1754.            SetCopyAttrTo 00
  1755.            CopyFiles from ShadowDirectory to [WindowsDirectory]\SYSTEM32 Quietly
  1756.                [NewDll].DL0 as [NewDll].DLL
  1757.            EndCopyFiles
  1758.            SetCopyAttrTo 01
  1759.  
  1760.        Else   ;; Check to see if there was an ERROR getting the DLL versions
  1761.  
  1762.            If "[String1]" = "ERROR"
  1763.  
  1764.                Dialog UseHeader "Error"
  1765.                    Can not get DDL FileVersion for ShadowDirectory\[NewDll].DL0
  1766.                    and [WindowsDirectory]\SYSTEM32\[NewDll].DLL. Unable to install
  1767.                    DLL, contact Synario Technical Support.
  1768.                EndDialog
  1769.  
  1770.            EndIf
  1771.  
  1772.        EndIf
  1773.  
  1774.     Else
  1775.  
  1776.        SetCopyAttrTo 00
  1777.        CopyFiles from ShadowDirectory to [WindowsDirectory]\SYSTEM32 Quietly
  1778.            [NewDll].DL0 as [NewDll].DLL
  1779.        EndCopyFiles
  1780.        SetCopyAttrTo 01
  1781.  
  1782.     EndIf
  1783.  
  1784. EndProcedure
  1785.  
  1786. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1787.  
  1788. Procedure CheckForWin32s130
  1789.  
  1790.     If (WindowsNT) .OR. (WindowsVersion >= 3.9)
  1791.         ;; Do nothing, Win NT or 95 
  1792.     Else
  1793.         [Array2][1] := Win32s
  1794.         [Array2][2] := Version
  1795.         [Array2][3] := 0.0.0.0
  1796.         [Array2][4] := [WindowsSystemDirectory]\WIN32S.INI
  1797.         GetPrivateProfileString Using [Array2]
  1798.  
  1799.         If [Array2][5] = 0.0.0.0
  1800.             Dialog UseHeader "Warning"
  1801.               You need to have Win32s installed on your system. Win32s
  1802.               version 1.30.172.0 or greater is required. Please install
  1803.               Win32s from the original product media (CD-ROM or floppy disks).
  1804.             EndDialog
  1805.         Else
  1806.             If [Array2][5] < 1.30.172.0
  1807.                 Dialog UseHeader "Warning"
  1808.                   You need a newer version of Win32s installed on your system.
  1809.                   Win32s version [Array2][5] was detected, but version 1.30.172.0
  1810.                   or greater is required. Please install Win32s from the original
  1811.                   product media (CD-ROM or floppy disks).
  1812.                 EndDialog
  1813.             Endif
  1814.         Endif    
  1815.     Endif
  1816. EndProcedure
  1817.  
  1818. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1819.  
  1820. Procedure InstallAddProgramItem
  1821.  
  1822.     If FileExists [String1]
  1823.         ProgramManagerDDE
  1824.             ReplaceItem([String2])
  1825.             AddItem([String1],[String2],[String1])
  1826.         EndProgramManagerDDE
  1827.     EndIf 
  1828.  
  1829. EndProcedure
  1830.  
  1831. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1832.  
  1833. Procedure InstallCreateProgramGroup
  1834.  
  1835.     ProgramManagerDDE
  1836.         CreateGroup([ProgramGroupName])
  1837.         ShowGroup([ProgramGroupName],1)
  1838.     EndProgramManagerDDE
  1839.  
  1840. EndProcedure
  1841.  
  1842. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1843.  
  1844. Procedure RegisterDIOxfer
  1845.  
  1846.   RegSetValue ClassesRoot CLSID_DIO_Xfer_Object Data IO Data Transfer Object
  1847.   RegSetValue ClassesRoot CLSID_DIO_Xfer_Object\CLSID {1B713A1C-27FD-11ce-8D37-080009965984}
  1848.   RegSetValue ClassesRoot CLSID\{1B713A1C-27FD-11ce-8D37-080009965984} Data IO Data Transfer Object
  1849.   RegSetValue ClassesRoot CLSID\{1B713A1C-27FD-11ce-8D37-080009965984}\LocalServer [ExeDirectory]\ntolesrv.exe
  1850.  
  1851. EndProcedure
  1852.  
  1853. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1854.  
  1855.